package cn.zktr.Personnel.controllers.tanyali;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

import cn.zktr.Personnel.model.service.tanyali.EmaTsService;

@Controller
public class EmaTsController {
	@Autowired
	private EmaTsService tservice;
	
	/**
	 * @author 招聘试卷传数据
	 *
	 */
	@RequestMapping("tyl/zp-shi-juan")
	public void demo1() {}
    	
	/**
	 * @param tt招聘试卷查询功能(搜索框内模糊查询)
	 */
	@RequestMapping("zhaopinshijuanchaxun")
	@ResponseBody
	public Map<String,Object> zhaopinshijuanchaxun(String outname,int page,int rows){
		Map<String,Object> map= new HashMap<>();
		map.put("total", tservice.pxshijuanchaxun(outname).size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray pxshijuanchaxun = tservice.pxshijuanchaxun(outname);
		map.put("rows", pxshijuanchaxun);
		return map;
	}
	
	/**
	 * @author 培训试卷传数据
	 *
	 */
	@RequestMapping("tyl/px-shi-juan")
	public void demo2() {}
    
	/**
	 * @param tt培训试卷查询功能(搜索框内模糊查询)
	 */
	@RequestMapping("peixunshijuanchaxun")
	@ResponseBody
	public Map<String,Object> peixunshijuanchaxun(String outname,int page,int rows){
		Map<String,Object> map= new HashMap<>();
		map.put("total", tservice.pxshijuanchaxun(outname).size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray pxshijuanchaxun = tservice.pxshijuanchaxun(outname);
		map.put("rows", pxshijuanchaxun);
		return map;
	}
	

	/**
	 * @author 升职试卷传数据
	 *
	 */
	@RequestMapping("tyl/shi-juan-ji-lu")
	public void demo3() {}
    
	/**
	 * @param tt升职试卷查询功能(搜索框内模糊查询)
	 */
	@RequestMapping("shengzhishijuanchaxun")
	@ResponseBody
	public Map<String,Object> shengzhishijuanchaxun(String outname,int page,int rows){
		Map<String,Object> map= new HashMap<>();
		map.put("total", tservice.szshijuanchaxun(outname).size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray szshijuanchaxun = tservice.szshijuanchaxun(outname);
		map.put("rows", szshijuanchaxun);
		return map;
	}
	
	@RequestMapping("tyl/kao-juan-pin-fen")
	public void demo4() {}
    
	/**
	 * @param 试卷评分查询功能(搜索框内模糊查询)
	 */
	@RequestMapping("shijuanpinfenchaxun")
	@ResponseBody
	public Map<String,Object> shijuanpinfenchaxun(String outname,int page,int rows){
		Map<String,Object> map= new HashMap<>();
		map.put("total", tservice.shijuanpinfenchaxun(outname).size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray shijuanpinfenchaxun = tservice.shijuanpinfenchaxun(outname);
		map.put("rows", shijuanpinfenchaxun);
		return map;
	}
}
